]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
power: Label the PENDING_CHARGE state as "Not Charging"
authorJoão Paulo Rechi Vita <jprvita@endlessm.com>
Fri, 2 Nov 2018 20:51:33 +0000 (13:51 -0700)
committerJoão Paulo Rechi Vita <jprvita@endlessm.com>
Wed, 14 Nov 2018 21:51:26 +0000 (13:51 -0800)
The pending-charge state means AC power is on but the battery is not
being charged. This can happen because its charge is above a certain
threshold, to avoid short charging cycles and prolong the battery's
life, or because the PSU is not powerful enough to charge the batteries.

Instead of lying to the user about something being estimated, we should
simply tell the truth and set the label to "Not Charging".

Closes: #701.
js/ui/status/power.js

index f21693f53388ff069f8aeb64b2a46e61d4e3a2f8..4a6ce2c24e987cc752f19eb02166f8378a50200b 100644 (file)
@@ -70,7 +70,9 @@ var Indicator = new Lang.Class({
             seconds = this._proxy.TimeToFull;
         else if (this._proxy.State == UPower.DeviceState.DISCHARGING)
             seconds = this._proxy.TimeToEmpty;
-        // state is one of PENDING_CHARGING, PENDING_DISCHARGING
+        else if (this._proxy.State == UPower.DeviceState.PENDING_CHARGE)
+            return _("Not Charging");
+        // state is PENDING_DISCHARGE
         else
             return _("Estimating…");